package dmqm.mall.service.impl;

import dmqm.mall.mapper.OrderMapper;
import dmqm.mall.model.Order;
import dmqm.mall.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List List() {
        return orderMapper.List();
    }

    @Override
    public boolean Add(Order order) {
        return orderMapper.Add(order) > 0;
    }

    @Override
    public boolean Update(Order order) {
        return orderMapper.Update(order) > 0;
    }

    @Override
    public boolean Delete(int id) {
        return orderMapper.Delete(id) > 0;
    }

    @Override
    public Order Get(int id) {
        return orderMapper.Get(id);
    }
}
